
public class UpdateFriendsList implements Runnable {
	private String _uname;
	private boolean _add;


	public UpdateFriendsList(String username, boolean add) {
		_add = add;
		_uname = username;
	}
	
	
	@Override
	public void run() {
		if(_add) {
			ClientLogic.fl.removeFriend(_uname);
			ClientLogic.fl.addFriend(_uname, "online");
		} else {
			ClientLogic.fl.removeFriend(_uname);
			ClientLogic.fl.addFriend(_uname, "offline");
			
			if(ClientLogic.friends.get(_uname).window!=null)
				ClientLogic.friends.get(_uname).window.shell.close();
		}
	}

}
